package com.tronsis.library.http;

import java.io.Serializable;

/**
 * http请求返回数据类
 *
 * @author allen@tronsis.com
 * @date 2015年11月4日 下午9:06:49
 */
public class HttpResponse<T> implements Serializable {

    private int code;
    private String msg;
    private String subMsg;
    private T data; // 请求返回的数据


    public HttpResponse() {
        super();
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


    public String getSubMsg() {
        return subMsg;
    }

    public void setSubMsg(String subMsg) {
        this.subMsg = subMsg;

    }

    @Override
    public String toString() {
        return "HttpResponse{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", subMsg='" + subMsg + '\'' +
                ", data=" + data +
                '}';
    }

}
